<?php

/**
 * @author Thanh Nguyen Dinh <thanhnguyendinh@admicro.vn>
 * @copyright 2012
 */

class Post_model extends CI_Model
{

    public function getPost()
    {
        
    }
    public function get_all_post(){
        $this->db->select('*')->from('landing_post')->order_by('modifydate','desc');
        $get=$this->db->get();
        $data = $get->result_array();
        $get->free_result();            
        return $data;         
    }
    
    public function get_post_by_id($id){
        $this->db->select('*')->from('landing_post')->where('id',$id)->order_by('modifydate','desc');
        $get=$this->db->get();
        $data = $get->result_array();
        $get->free_result();            
        return $data;            
    }

}

?>
